package us.wili.dev.common.model;
import io.swagger.annotations.ApiModelProperty;

public class ResponseDto<T> {

    @ApiModelProperty(value = "状态")
    private Status status = new Status();
    @ApiModelProperty(value = "数据")
    private T data;

    public ResponseDto() {}

    public ResponseDto(T data) {
        this.data = data;
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public void setErrCode(Integer errCode) {
        this.status.setErrCode(errCode);
    }

    public void setMessage(String message) {
        this.status.setMessage(message);
    }

    public class Status {
        private Integer errCode = 200;
        private String message;

        public Integer getErrCode() {
            return errCode;
        }

        public void setErrCode(Integer errCode) {
            this.errCode = errCode;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }
    }
}
